x86/emul: Correct the handling of eflags with SYSCALL
authorAndrew Cooper <andrew.cooper3@citrix.com>
Sun, 18 Dec 2016 15:42:59 +0000 (15:42 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Thu, 22 Dec 2016 17:16:54 +0000 (17:16 +0000)
commitee7c659f733371dfe5d65b58f6847712c166575a
treed80deb8544cce7cc715d6b3a447ada806e256ad0
parentaf9f2748827dc1aa5adec4c83141c95e73a1a7d5
x86/emul: Correct the handling of eflags with SYSCALL

A singlestep #DB is determined by the resulting eflags value from the
execution of SYSCALL, not the original eflags value.

By using the original eflags value, we negate the guest kernels attempt to
protect itself from a privilege escalation by masking TF.

Have the SYSCALL emulation recalculate tf after the instruction is complete.

This is XSA-204

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/x86_emulate/x86_emulate.c